package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;
import java.util.List;


/**
 * The persistent class for the applicant_hire_record database table.
 * 
 */
@Entity
@Table(name="applicant_hire_record")
@NamedQuery(name="ApplicantHireRecord.findAll", query="SELECT a FROM ApplicantHireRecord a")
public class ApplicantHireRecord implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="record_id")
	private int recordId;

	@Column(name="applicant_id")
	private int applicantId;

	@Temporal(TemporalType.DATE)
	@Column(name="apply_date")
	private Date applyDate;

	@Column(name="apply_emp_id")
	private int applyEmpId;

	@Column(name="apply_emp_name")
	private String applyEmpName;

	@Column(name="approve_comments")
	private String approveComments;

	@Temporal(TemporalType.DATE)
	@Column(name="approve_date")
	private Date approveDate;

	@Column(name="approve_dep")
	private String approveDep;

	@Column(name="approve_dep_id")
	private int approveDepId;

	@Column(name="approve_status")
	private byte approveStatus;

	private String approver;

	@Column(name="approver_id")
	private int approverId;

	@Column(name="doc_num")
	private String docNum;

	@Temporal(TemporalType.DATE)
	@Column(name="hire_date")
	private Date hireDate;

	@Column(name="hire_dep")
	private String hireDep;

	@Column(name="hire_dep_id")
	private int hireDepId;

	@Column(name="hire_post")
	private String hirePost;

	@Column(name="hire_post_id")
	private int hirePostId;

	@Column(name="hire_rank")
	private String hireRank;

	@Column(name="hire_rank_id")
	private int hireRankId;

	@Column(name="rec_plan_id")
	private int recPlanId;

	private String remark;

	//bi-directional many-to-one association to ApplicantHireAttachment
	@OneToMany(mappedBy="applicantHireRecord")
	@JsonIgnore
	private List<ApplicantHireAttachment> applicantHireAttachments;

	public ApplicantHireRecord() {
	}

	public int getRecordId() {
		return this.recordId;
	}

	public void setRecordId(int recordId) {
		this.recordId = recordId;
	}

	public int getApplicantId() {
		return this.applicantId;
	}

	public void setApplicantId(int applicantId) {
		this.applicantId = applicantId;
	}

	public Date getApplyDate() {
		return this.applyDate;
	}

	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}

	public int getApplyEmpId() {
		return this.applyEmpId;
	}

	public void setApplyEmpId(int applyEmpId) {
		this.applyEmpId = applyEmpId;
	}

	public String getApplyEmpName() {
		return this.applyEmpName;
	}

	public void setApplyEmpName(String applyEmpName) {
		this.applyEmpName = applyEmpName;
	}

	public String getApproveComments() {
		return this.approveComments;
	}

	public void setApproveComments(String approveComments) {
		this.approveComments = approveComments;
	}

	public Date getApproveDate() {
		return this.approveDate;
	}

	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}

	public String getApproveDep() {
		return this.approveDep;
	}

	public void setApproveDep(String approveDep) {
		this.approveDep = approveDep;
	}

	public int getApproveDepId() {
		return this.approveDepId;
	}

	public void setApproveDepId(int approveDepId) {
		this.approveDepId = approveDepId;
	}

	public byte getApproveStatus() {
		return this.approveStatus;
	}

	public void setApproveStatus(byte approveStatus) {
		this.approveStatus = approveStatus;
	}

	public String getApprover() {
		return this.approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public int getApproverId() {
		return this.approverId;
	}

	public void setApproverId(int approverId) {
		this.approverId = approverId;
	}

	public String getDocNum() {
		return this.docNum;
	}

	public void setDocNum(String docNum) {
		this.docNum = docNum;
	}

	public Date getHireDate() {
		return this.hireDate;
	}

	public void setHireDate(Date hireDate) {
		this.hireDate = hireDate;
	}

	public String getHireDep() {
		return this.hireDep;
	}

	public void setHireDep(String hireDep) {
		this.hireDep = hireDep;
	}

	public int getHireDepId() {
		return this.hireDepId;
	}

	public void setHireDepId(int hireDepId) {
		this.hireDepId = hireDepId;
	}

	public String getHirePost() {
		return this.hirePost;
	}

	public void setHirePost(String hirePost) {
		this.hirePost = hirePost;
	}

	public int getHirePostId() {
		return this.hirePostId;
	}

	public void setHirePostId(int hirePostId) {
		this.hirePostId = hirePostId;
	}

	public String getHireRank() {
		return this.hireRank;
	}

	public void setHireRank(String hireRank) {
		this.hireRank = hireRank;
	}

	public int getHireRankId() {
		return this.hireRankId;
	}

	public void setHireRankId(int hireRankId) {
		this.hireRankId = hireRankId;
	}

	public int getRecPlanId() {
		return this.recPlanId;
	}

	public void setRecPlanId(int recPlanId) {
		this.recPlanId = recPlanId;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public List<ApplicantHireAttachment> getApplicantHireAttachments() {
		return this.applicantHireAttachments;
	}

	public void setApplicantHireAttachments(List<ApplicantHireAttachment> applicantHireAttachments) {
		this.applicantHireAttachments = applicantHireAttachments;
	}

	public ApplicantHireAttachment addApplicantHireAttachment(ApplicantHireAttachment applicantHireAttachment) {
		getApplicantHireAttachments().add(applicantHireAttachment);
		applicantHireAttachment.setApplicantHireRecord(this);

		return applicantHireAttachment;
	}

	public ApplicantHireAttachment removeApplicantHireAttachment(ApplicantHireAttachment applicantHireAttachment) {
		getApplicantHireAttachments().remove(applicantHireAttachment);
		applicantHireAttachment.setApplicantHireRecord(null);

		return applicantHireAttachment;
	}

}